import com.yu.HelloController;
import com.yu.annotation.RpcScanner;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @PackageName: PACKAGE_NAME
 * @Description:
 * @Version: v1.0.0
 * @Author: yuweilin
 * @Date: 16:22
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2021/2/5      yuweilin         v1.0.0               新建
 */
@RpcScanner(basePackage = {"com.yu"})
public class RpcClient {
    public static void main(String[] args) throws InterruptedException {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(RpcClient.class);
        String[] names = applicationContext.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }
        HelloController helloController = (HelloController) applicationContext.getBean("helloController");
        helloController.test();
    }

}
